


#include <iostream>
using namespace std;

int main(int argc, char **argv)
{
	
	int A[]={1,2,0,0,0,0};
	int n=6;
	int count=0;
	for(int i=0;i<n;++i)
	{
		if(A[i+1]!=A[i]||i==n-1)
		{
			A[count++]=A[i];
			cout<<A[i]<<",";
			}
		
		}
	
	return count;
}

